<style>
    .div-indent{
        float: left;
        width: 18%;/*12.28*/
        margin-left: 2%;
    }
    .head-indent{
        -webkit-transition: all .5s;
        transition: all .5s;
        margin-top: 14%;
        font-size: 16px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        line-height: 16px;
    }
    .indent-figure{
        font-size: 18px;
        margin-top: 18%;
        margin-bottom: 14%;
    }
    .content{
        width: 70%;
    }
    .head{
        font-size:18px;
    }
    .head-bottom{
        float: left;
        width: 24%;
        margin-left: 1%;
        padding: 12px 20px;
        background-color: #f8f8f8;
        border-radius: 10px;
    }
    .bottom-left{
        float: left;
        width: 22%;
        padding-top: 15px;
        text-align: center;
    }
    .bottom-left img{
        width: 70px;
    }
    .bottom-left span{
        width: 13%;
        margin-top: 20%;
        float: left;
        line-height: 31px;
        font-size: 18px;
        text-align: center;
    }
    .bottom-right{
        float: left;
        width: 78%;
        font-size: 16px;
        line-height: 28px;
        padding-top: 5px;
        padding-left: 5%;
    }
    .content-left{
        float: left;
        margin-right: 3%;
    }
    .content-right{
        font-weight: bold;
    }
    .month_bar{
        height: 470px;
        margin-left: 2%;
        margin-top: 2%;
    }

    .foot-export{
        float: right;
    }
    .row{
        margin-right: 0px;
        margin-left: 0px;
    }
    .row-sort{
        margin-left: 2%;
    }
    .sort_piece{
        float: left;
        width: 33.33%;
    }
    .sort_piece .head{
        text-align: center;
    }
    .sort_piece .head span{
        font-size: 16px;
    }
    .sort_piece .content{
        margin-top: 5%;
        margin-left: auto;
        margin-right: auto;
    }
    td {
        height: 32px;
        font-size: 14px;
    }
    .portrait{
        width: 29px;
    }
    a {
        text-decoration: none;
        color: black;
    }

    .head-hr {
        width: 111%;
        height: 1px;
        color: #e9e9e9;
        margin: 10px 0 0 -20px
    }
</style>
<div>
    <div class="col-lg-12">
        <section class="panel">
            <div class="panel-body">
                <div class="row">
                    <div class="div-indent">
                        <div class="tcenter content">
                            <div class="head-indent">缺货订单</div>
                            <div class="indent-figure indent_sum sum_income"><a href="/cloudstorage/purchase?status=1" ><?php echo $this->data['higher_hold_order_num']; ?></a></div>
                        </div>
                    </div>
                    <div class="div-indent">
                        <div class="tcenter content">
                            <div class="head-indent">待提货订单</div>
                            <div class="indent-figure order_cus_sum cost_sum"><a href="/cloudstorage/pick-up?status=3"><?php echo $this->data['freight_forward_order_num']; ?></a></div>
                        </div>
                    </div>
                    <div  href="" class="div-indent">
                        <div class="tcenter content">
                            <div class="head-indent">待审核客户</div>
                            <div class="indent-figure order_price_sum margin"><a href="/customer/list?customer_status=1"><?php echo $this->data['check_customer_num']; ?></a></div>
                        </div>
                    </div>
                    <div class="div-indent" style="display: none;">
                        <div class="tcenter content">
                            <div class="head-indent">昨日上线人数</div>
                            <div class="indent-figure order_price_sum margin"><?php echo $this->data['yesterday_customer_num']; ?></div>
                        </div>
                    </div>
                    <div class="div-indent">
                        <div class="tcenter content">
                            <div class="head-indent">昨日进货人数</div>
                            <div class="indent-figure order_price_sum margin"><?php echo $this->data['yesterday_purchase_customer_num']; ?></div>
                        </div>
                    </div>
                    <div class="div-indent">
                        <div class="tcenter content">
                            <div class="head-indent">昨日提货人数</div>
                            <div class="indent-figure order_price_sum margin"><?php echo $this->data['yesterday_pick_up_customer_num']; ?></div>
                        </div>
                    </div>
                    <div class="div-indent" style="display: none;">
                        <div class="tcenter content">
                            <div class="head-indent">近7天未上线</div>
                            <div class="indent-figure order_price_sum margin"><?php echo $this->data['seven_off_line_customer_num']; ?></div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="head-bottom">
                        <div class="head">进货</div>
                        <hr class="head-hr" />
                        <div class="bottom-left"><img src="/images/jinhuo_pic.png"></img></div>
                        <div class="bottom-right">
                            <div class="right-content">
                                <div class="content-left">本月成交额</div>
                                <div class="content-right"><?php echo $this->data['purchase_info']['order_sum']; ?>元</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">本月成交量</div>
                                <div class="content-right"><?php echo $this->data['purchase_info']['order_count']; ?>笔</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">较上月增长</div>
                                <div class="content-right"><?php echo $this->data['purchase_info']['increase_rate']; ?>%</div>
                            </div>
                        </div>
                    </div>
                    <div class="head-bottom">
                        <div class="head">城市合伙人进货</div>
                        <hr class="head-hr" />
                        <div class="bottom-left"><img src="/images/sanxing-jinhuo.png"></img></div>
                        <div class="bottom-right">
                            <div class="right-content">
                                <div class="content-left">本月成交额</div>
                                <div class="content-right"><?php echo $this->data['three_purchase_info']['order_sum']; ?>元</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">本月成交量</div>
                                <div class="content-right"><?php echo $this->data['three_purchase_info']['order_count']; ?>笔</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">较上月增长</div>
                                <div class="content-right"><?php echo $this->data['three_purchase_info']['increase_rate']; ?>%</div>
                            </div>
                        </div>
                    </div>
                    <div class="head-bottom">
                        <div class="head">提货</div>
                        <hr class="head-hr" />
                        <div class="bottom-left"><img src="/images/tihuo_pic.png"></img></div>
                        <div class="bottom-right">
                            <div class="right-content">
                                <div class="content-left">本月成交额</div>
                                <div class="content-right"><?php echo $this->data['pick_info']['order_sum']; ?>元</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">本月成交量</div>
                                <div class="content-right"><?php echo $this->data['pick_info']['order_count']; ?>笔</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">较上月增长</div>
                                <div class="content-right"><?php echo $this->data['pick_info']['increase_rate']; ?>%</div>
                            </div>
                        </div>
                    </div>
                    <div class="head-bottom">
                        <div class="head">用户</div>
                        <hr class="head-hr" />
                        <div class="bottom-left"><img src="/images/yonghu_pic.png"></img></div>
                        <div class="bottom-right">
                            <div class="right-content">
                                <div class="content-left">本月会员申请数</div>
                                <div class="content-right"><?php echo $this->data['customer_info']['agent_customer_num']; ?>人</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">本月授权数</div>
                                <div class="content-right"><?php echo $this->data['customer_info']['check_customer_num']; ?>人</div>
                            </div>
                            <div class="right-content">
                                <div class="content-left">会员总人数</div>
                                <div class="content-right"><?php echo $this->data['customer_info']['customer_total_num']; ?>人</div>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="row">
                    <div id="month_bar" class="month_bar"></div>
                </div>
                <div class="row row-sort" >
                    <div class="row"><h4>销售排行</h4><div><a href="/index/export-sort"  class="btn btn-info foot-export">导出全部</a></div></div>
                    <div class="row">
                        <div class="sort_piece">
                            <div class="head"><span>上月</span></div>
                            <div class="content">
                                <table class="table">
                                    <?php
                                    $i = 1;
                                    foreach ($this->data['sale_sort']['last_month'] as $data_info) {?>
                                        <tr>
                                            <td><?php echo $i++ ?></td>
                                            <td><img onerror="$(this).attr('src', '/images/默认头像.png')" class="portrait" src="<?php echo $data_info['portrait'] ?>"></td>
                                            <td><?php echo $data_info['name'] ?></td>
                                            <td>￥<?php echo $data_info['amount_sum'] ?></td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                        <div class="sort_piece">
                            <div class="head"><span>本月</span></div>
                            <div class="content">
                                <table class="table">
                                    <?php
                                    $i = 1;
                                    foreach ($this->data['sale_sort']['this_month'] as $data_info) {?>
                                        <tr>
                                            <td><?php echo $i++ ?></td>
                                            <td><img onerror="$(this).attr('src', '/images/默认头像.png')" class="portrait" src="<?php echo $data_info['portrait'] ?>"></td>
                                            <td><?php echo $data_info['name'] ?></td>
                                            <td>￥<?php echo $data_info['amount_sum'] ?></td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                        <div class="sort_piece">
                            <div class="head"><span>总排名</span></div>
                            <div class="content">
                                <table class="table">
                                    <?php
                                    $i = 1;
                                    foreach ($this->data['sale_sort']['total'] as $data_info) {?>
                                        <tr>
                                            <td><?php echo $i++ ?></td>
                                            <td><img onerror="$(this).attr('src', '/images/默认头像.png')" class="portrait" src="<?php echo $data_info['portrait'] ?>"></td>
                                            <td><?php echo $data_info['name'] ?></td>
                                            <td>￥<?php echo $data_info['amount_sum'] ?></td>
                                        </tr>
                                    <?php } ?>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </section>
    </div>
</div>
<script type="text/javascript" src="/js/echarts.min.js"></script>
<script> var bar_data = <?php echo json_encode($this->data['six_month_sale_bar']) ?> </script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('month_bar'));

    option = {
        title: {
            text: '近六个月销售统计'
        },
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        legend: {
            data:bar_data.legend_data
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis : [
            {
                type : 'category',
                data : bar_data.x_axis_data
            }
        ],
        yAxis : [
            {
                type : 'value'
            }
        ],
        series :  bar_data.series_data
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>